<?php $this->load->view('header');?>
<body class="childrenBody" style="background-color: #f2f4f8">
<div style="margin: 20px 30px;">
    <?php foreach($data as $item): ?>
    <div class="mdata_tab">
        <?php if($item['type'] == 'dongzuo'):?>
            <div class="_data_title">
                <?=$item['stime']?>&nbsp;&nbsp;--&nbsp;&nbsp;<b>训练动作</b>
            </div>
            <div style="padding: 15px 10px;">
                <?php foreach($item['info'] as $vl): ?>
                    <p style="font-weight: bold;padding-top: 5px;"><?php if (isset($vl['name'])):?><?=$vl['name']?><?php endif;?></p>
                    休息时间: <?php if (isset($vl['rest'])):?><?=$vl['rest']?><?php endif;?> (秒) &nbsp;&nbsp;&nbsp;&nbsp;
                    运动时长: <?php if (isset($vl['duration'])):?><?=$vl['duration']?><?php endif;?> (秒)&nbsp;&nbsp;&nbsp;&nbsp;
                    运动次数: <?php if (isset($vl['frequency'])):?><?=$vl['frequency']?><?php endif;?> (次)&nbsp;&nbsp;
                    组数：<?php if (isset($vl['group'])):?><?=$vl['group']?><?php endif;?> （组）
                <?php endforeach;?>
            </div>
        <?php elseif ($item['type'] == 'yinshi'): ?>
            <div class="_data_title">
                <?=$item['stime']?>&nbsp;&nbsp;--&nbsp;&nbsp;<b>饮食建议</b>
            </div>
            <div style="padding: 15px 10px;">
                <?=$item['info'][0]?>
            </div>
        <?php else: ?>
            <div class="_data_title">
                <?=$item['stime']?>&nbsp;&nbsp;--&nbsp;&nbsp;<b>推荐课程</b>
            </div>
            <div style="padding: 15px 10px;">
                <?php foreach($item['info'] as $vl): ?>
                    <span style="padding-right: 15px;"><?=$vl['title']?></span>
                <?php endforeach;?>
            </div>
        <?php endif;?>
    </div>
    <?php endforeach;?>
</div>
</body>
</html>